//
//  DDCompanyInfoCell.m
//  DingDongZP
//
//  Created by Jyh on 16/3/27.
//  Copyright © 2016年 iyhjiang.com. All rights reserved.
//

#import "DDCompanyInfoCell.h"


@interface DDCompanyInfoCell()

//@property (weak, nonatomic) IBOutlet UIView *urlLab;



@end

@implementation DDCompanyInfoCell

- (void)awakeFromNib {
    // Initialization code
    self.detailView.layer.cornerRadius = 5;
    self.detailView.layer.borderColor = COLOR_BORDER_GRAY.CGColor;
    self.detailView.layer.borderWidth = 0.5;
    
    self.companyNumberLabel.text = @"";
    self.companyUrlLabel.text = @"";
    self.companyNameLabel.text = @"";
    self.companyAddressLabel.text = @"";
    
    self.userInteractionEnabled = true;
    _companyUrlLabel.userInteractionEnabled = true;

    
}

- (void) setModel:(DDJobsDetail *)model {
    
    _model = model;
    
    self.companyNumberLabel.text = model.companysize;// == nil ? model.companysize : @"";
    self.companyUrlLabel.text = model.companywebsite;
    
    self.companyNameLabel.text = model.companyfullname; //== nil ? model.companyNameLabel : @"";
    self.companyAddressLabel.text = model.companyaddress; //== nil ? model.companysize : @"";
    
    WEAKSELF
    [_companyUrlLabel bk_whenTapped:^{
        
        if (_tapUrlAction != nil) {
            
            weakSelf.tapUrlAction(model.companywebsite);
        }
    }];
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
